package com.zhangtai.modules.service.salary;

import com.zhangtai.modules.entity.salary.SalaryDistributionRecordingEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;


/**
 * 薪资组分配记录
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-09-22 14:01:18
 */

public interface SalaryDistributionRecordingService {

    @GetMapping("/findSalaryDistributionRecordingList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage(@RequestParam(value = "keyword", required = false) String keyword,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    public List<Map<String,Object>> queryPageList(
            @RequestParam(value = "orgIds", required = false) List<Long> orgIds,
            @RequestParam(value = "orgId", required = false) List<Long> orgId,
            @RequestParam(value = "unitIds", required = false) List<Long> unitIds,
            @RequestParam(value = "jobIds", required = false) List<Long> jobIds,
            @RequestParam(value = "distributionTime", required = false) String distributionTime,
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "code", required = false) String code,
            @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
            @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);
    @GetMapping("/infoSalaryDistributionRecording")
    @ApiOperation(value = "根据id查找")
    SalaryDistributionRecordingEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveSalaryDistributionRecording")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody SalaryDistributionRecordingEntity entity);

    @PostMapping("/updateSalaryDistributionRecording")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody SalaryDistributionRecordingEntity entity);

    @GetMapping("/deleteOneSalaryDistributionRecording")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteSalaryDistributionRecordings")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

